package com.project.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.time.LocalDate;
import java.util.List;

/**
 * 采购信息实体类
 */
@TableName("t_buyer")
public class BuyerBean {
    /**
     * 编号
     */
    @TableId(value = "pk_buyerId",type = IdType.AUTO)
    private Integer id;
    /**
     * 采购员
     */
    @TableField(value = "b_user")
    private String user;
    /**
     * 采购日期
     */
    @TableField(value = "b_date")
    private LocalDate date=LocalDate.now();
    /**
     * 采购商品集合
     */
    @TableField(exist = false)
    private List<BuyerInfoBean> buyerInfoList;
    /**
     * 所属供应商id
     */
    @TableField(value = "fk_supplierId")
    private Integer supplierId;
    /**
     * 所属供应商
     */
    @TableField(exist = false)
    private SupplierBean supplierBean;



    public BuyerBean() {
    }

    public BuyerBean(String user, Integer supplierId) {
        this.user = user;
        this.supplierId = supplierId;
    }

    @Override
    public String toString() {
        return "BuyerBean{" +
                "id=" + id +
                ", user='" + user + '\'' +
                ", date=" + date +
                ", buyerInfoList=" + buyerInfoList +
                ", supplierId=" + supplierId +
                ", supplierBean=" + supplierBean +
                "\n";
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getUser() {
        return user;
    }

    public void setUser(String user) {
        this.user = user;
    }

    public LocalDate getDate() {
        return date;
    }

    public void setDate(LocalDate date) {
        this.date = date;
    }

    public List<BuyerInfoBean> getBuyerInfoList() {
        return buyerInfoList;
    }

    public void setBuyerInfoList(List<BuyerInfoBean> buyerInfoList) {
        this.buyerInfoList = buyerInfoList;
    }

    public Integer getSupplierId() {
        return supplierId;
    }

    public void setSupplierId(Integer supplierId) {
        this.supplierId = supplierId;
    }

    public SupplierBean getSupplierBean() {
        return supplierBean;
    }

    public void setSupplierBean(SupplierBean supplierBean) {
        this.supplierBean = supplierBean;
    }



}

